import { request } from '@/request'

export const getDoanet = <T extends object, R = any>(
  data: T
): Promise<IResponse<IResponseList<R>>> => {
  return request.GET<T>({ url: '/app/donate/list', params: data })
}

export const addDonate = <T extends object, R = any>(
  data: T
): Promise<IResponse<R>> => {
  return request.POST<T>({ url: '/app/donate/add-record', params: data })
}

export const getDonateRecordList = <T extends object, R = any>(
  data: T
): Promise<IResponse<IResponseList<R>>> => {
  return request.GET<T>({ url: '/app/donate/user-records', params: data })
}
